package com.googlecode.gwtbb.server.dao.picture;

import com.googlecode.gwtbb.client.shared.entity.picture.Thumb;
import com.googlecode.gwtbb.server.dao.DaoIbatis;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Abraham Grief
 * @version $Id$
 * @since Jul 31, 2008
 */
@SuppressWarnings({"unchecked"})
@Transactional
public class ThumbDaoIbatis extends DaoIbatis<Thumb> implements ThumbDao {
	public String getSqlNamespace() {
		return "gwtbb.thumb";
	}

	public List<Thumb> selectByPictureId(Long pictureId) {
		return (List<Thumb>)getSqlMapClientTemplate().queryForList(getSqlNamespace() + ".selectByPictureId", pictureId);
	}
}
